package com.hoas.quickstart.threads.chapter07.chapter07_2_1;

public class Run {

    public static void main(String[] args) {
        ThreadA a = new ThreadA();
        ThreadB b = new ThreadB();
        ThreadGroup group = new ThreadGroup("hoas-group");
        Thread aTread = new Thread( group, a);
        Thread bTread = new Thread( group, b);

        aTread.start();
        bTread.start();

        System.out.println("活动的线程数:" + group.activeCount());
        System.out.println("线程组的名称:" + group.getName());

    }

}
